﻿using System;
using System.Web.UI;

namespace MyWeb.Admin.Usercontrols
{
    public partial class ucSideBar : UserControl
    {
        #region Event Page

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        #endregion

        #region Method Page

        protected string SetClass(params string[] defaultpage)
        {
            try
            {
                foreach (string t in defaultpage)
                {
                    if (Request.Url.PathAndQuery.ToLower().Contains(t.ToLower()))
                        return "active";
                }
                return "";
            }
            catch
            {
                return "";
            }
        }

        protected string IsShow(params string[] defaultpage)
        {
            try
            {
                foreach (string t in defaultpage)
                {
                    if (Request.Url.PathAndQuery.ToLower().Contains(t.ToLower()))
                        return "show";
                }
                return "hide";
            }
            catch
            {
                return "hide";
            }
        }

        #endregion
    }
}